home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / dasv10_.arj / SDISK.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1993-09-17  |  873 b   |  41 lines

  1. // SDisk v1.0, 9/17/93. (c)1993 DAS Software Publications
  2. // Registered copy
  3. #include <fstream.h>
  4. #include <process.h>
  5. #include <conio.h>
  6.  
  7. void main(int argc, char * argv[])
  8. {
  9.     if (argc != 2) {
  10.         cerr<<"SDisk v1.0, 9/17/93. (c)1993 DAS Software Publications.\n";
  11.         cerr<<"Registered copy\n\n";
  12.         cerr<<"Usage: sdisk [drive:\\path\\filename]\n\n";
  13.         cerr<<"Scans specified drive:\\path for file entered until found,\n";
  14.         cerr<<"or user aborts with [return].\n";
  15.         exit(-1);
  16.     }
  17.  
  18. char ch;
  19. int s_disk=1;
  20. ifstream infile;
  21.  
  22. while (ch != '\r')  {
  23. infile.open(argv[1]);
  24.  
  25.     cerr<<"\bInsert disk #"<<s_disk<<" and press any key..."<<endl;
  26.  
  27. if (!infile) {
  28.     cerr<<"File "<<argv[1]<<" NOT found."<<endl;
  29. } else {
  30.     cout<<"File "<<argv[1]<<" found on disk #"<<s_disk<<endl;
  31.     exit(-1);
  32. }
  33. s_disk++;
  34. ch = getche();
  35. }
  36. cerr<<"Scan aborted."<<endl;
  37. }
  38.  
  39.  
  40.  
  41.